<template>
    <div class="area_withdrawal_agent">
        <Layout>
            <Header class="header">
                <Row>
                    <Col :span="24">
                        <div>
                            <span class="border-left"></span>
                            提现记录
                        </div>
                    </Col>
                </Row>
            </Header>
            <Content class="content">
                <div class="search-box">
                    <Row :gutter="16" style="min-width: 1024px">
                        <Col :span="6">
                            银行账号：
                            <Input v-model="userId" placeholder="用户ID/账号" style="width:auto"/>
                        </Col>
                        
                        <Col :span="6">
                            时间段：
                            <DatePicker  v-model="time" :options="options" :start-date="new Date(new Date() - (30*24*60*60*1000))" type="daterange" placement="bottom" placeholder="请选择时间" style="width: auto"></DatePicker>
                        </Col>
                        <Col :span="6">
                            <div class="search-btn">查询</div>
                        </Col>
                    </Row>
                </div>

                <div class="btn-box">
                    <Button type="primary" class="btn" @click="exportData()">导出数据</Button>
                </div>

                <div class="table-box">
                    <el-table
                        ref="table"
                        :data="tableData"
                        size="mini"
                        style="width: 100%;min-width: 800px">
                        <!-- <el-table-column
                            type="selection"
                            width="55">
                        </el-table-column> -->
                        <el-table-column
                            align="center"
                            prop="id"
                            label="流水号">
                        </el-table-column>
                        <el-table-column
                            align="center"
                            prop="userName"
                            label="用户昵称">
                        </el-table-column>
                        <el-table-column
                            align="center"
                            label="提现金额">
                            <template slot-scope="scope">
                                <p>￥{{scope.row.upMoney}}</p>
                            </template>
                        </el-table-column>
                        <el-table-column
                            align="center"
                            label="提现后余额">
                            <template slot-scope="scope">
                                <p>￥{{scope.row.upMoney}}</p>
                            </template>
                        </el-table-column>
                        <el-table-column
                            align="center"
                            label="提现时间"
                            min-width="120">
                            <template slot-scope="scope">
                                <p>{{scope.row.upTime}}</p>
                            </template>
                        </el-table-column>
                        <!-- <el-table-column
                            align="center"
                            label="提现渠道">
                            <template slot-scope="scope">
                                <p>{{scope.row.methods}}</p>
                            </template>
                        </el-table-column> -->
                        <!-- <el-table-column
                            align="center"
                            prop="upAccount"
                            label="提现账户">
                        </el-table-column> -->
                        <el-table-column
                            align="center"
                            label="提现审核">
                            <template slot-scope="scope">
                                <p>{{scope.row.audit === 0 ? '未审核' : '已审核'}}</p>
                            </template>
                        </el-table-column>
                        <el-table-column
                            align="center"
                            label="提现状态">
                            <template slot-scope="scope">
                                <p>{{scope.row.state === 0 ? '未到账' : '已到账'}}</p>
                            </template>
                        </el-table-column>
                        <!-- <el-table-column
                            label="操作"
                            align="center">
                            <template slot-scope="scope">
                                <el-button type="text" size="small" @click="look(scope.row.userId)">查看详情</el-button>
                            </template>
                        </el-table-column> -->
                    </el-table>
                </div>

                <div class="page-box">
                    <Page :total="total" :page-size="pageSize" show-elevator show-total />
                </div>
            </Content>
            <Footer>
                <p class="copy-right">Copyright © {{host}}, All Rights Reserved.</p>
            </Footer>
        </Layout>
    </div>
    
</template>

<script>
    export default {
        data(){
            return {
                host: window.location.host,
                time: '',//日期
                options: {
                    disabledDate (date) {
                        return date && date.valueOf() > Date.now();
                    }
                },//日期选择范围配置
                tableData: [
                    {
                        id: '66666666',
                        userName: '张三',
                        upMoney: '1000',
                        upTime: '2018-08-30 14:48:38',
                        methods: '支付宝',
                        upAccount: '18668953556',
                        audit: 0,
                        state: 0,
                    }
                ],//表格数据
                total: 6,//数据总条数
                pageSize: 10,//每页显示条数
            }
        },
        mounted(){
            this.getList();
        },

        computed: {

        },

        watch: {
            
        },
        
        methods: {
            getList() {
                for (let index = 0; index < 5; index++) {
                    this.tableData.push(this.tableData[0])
                }
            },
            exportData() {
                
            }
        }  
    }
</script>


<style lang="less">
    @import '../../../assets/styles/constant.less';
    .area_withdrawal_agent{
        width: 100%;
        height: 100%;
        overflow-x: hidden;
        overflow-y: auto;
        background-color: #f5f7f9;
        border-bottom: 1px solid #ddd;
        .ivu-layout{
            min-height: 100%;
        }
        .header{
            font-size: 14px;
            line-height: 40px;
            height: 40px !important;
            color: #434343;
            padding: 0 50px;
            background-color: @background;
            border-bottom: 1px solid #ddd;
            .border-left {
                border-left: 5px solid @baseColor;
                margin-right: 4px;
            }
        }
        .content{
            width: 100%;
            min-height: 76%;
            padding: 20px 60px;
            .search-box{
                .search-btn{
                    width: 100px;
                    height: 32px;
                    line-height: 32px;
                    text-align: center;
                    background-color: @greenColor;
                    border-radius: 4px;
                    color: #fff;
                    cursor: pointer;
                }
            }
            .btn-box{
                margin-top: 10px;
                display: flex;
                justify-content: flex-end;
                .btn{
                    background-color: #fff;
                    border: 1px solid #ddd;
                    color: #333;
                }
            }
            .table-box{
                margin-top: 10px;
                width: 100%;
                .el-table th{
                    background-color: #eee;
                    color: #333;
                    font-size: 14px;
                }
                .el-button--text{
                    color: @greenColor;
                }
            }
            .page-box{
                height: 50px;
                line-height: 50px;
                display: flex;
                justify-content: flex-end;
                background-color: #fff;
                padding: 0 20px;
                
            }
        }
        .copy-right{
            text-align: center;
            color: #aaa;
            font-size: 12px;
        }
    }
</style>